﻿using System.ComponentModel.DataAnnotations;

namespace PrivateTracker.Service.Application;
/// <summary>
/// 注册输入参数
/// </summary>
public class RegistInput
{
    /// <summary>
    /// 
    /// </summary>
    [Display(Name = "RegistInput.Account"), Required(ErrorMessage = "RegistInput.Account.Required"), RegularExpression("[a-zA-Z0-9_-]{5,15}", ErrorMessage = "RegistInput.Account.RegularExpression")]
    public string Account { get; set; }

    /// <summary>
    /// 密码
    /// </summary>
    [Display(Name = "RegistInput.Password"), Required(ErrorMessage = "RegistInput.Password.Required"), RegularExpression("(?=.*[0-9])(?=.*[a-zA-Z])(?=([\x21-\x7e]+)[^a-zA-Z0-9]).{8,30}", ErrorMessage = "RegistInput.Password.RegularExpression")]
    public string Password { get; set; }

    /// <summary>
    /// 昵称
    /// </summary>
    public string NickName { get; set; }

    /// <summary>
    /// 头像
    /// </summary>
    public string Avatar { get; set; }

    /// <summary>
    /// 生日
    /// </summary>
    public DateTime? Birthday { get; set; }

    /// <summary>
    /// 性别-男_1、女_2
    /// </summary>
    public int Sex { get; set; }

    /// <summary>
    /// 邮箱
    /// </summary>
    [Display(Name = "RegistInput.Email"), Required(ErrorMessage = "RegistInput.Email.Required"), RegularExpression(@"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$", ErrorMessage = "RegistInput.Email.RegularExpression")]
    public string Email { get; set; }

}